home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk14 / arexx / arexx.txt next >
Text File  |  1995-03-18  |  7KB  |  183 lines

  1.  
  2.  
  3.  
  4.               AREXX - The REXX language for the Amiga    
  5.                Copyright May, 1988  by Jim Crotinger
  6.  
  7.  
  8.   AREXX, written by Bill Hawes of ConMan fame, is the Amiga implementation
  9. of the REXX language. Since most people don't seem to know what AREXX is,
  10. though many have heard of it, I thought I'd piece together a little
  11. summary. Most of this is paraphrased from the "AREXX Users Reference
  12. Manual" (which comes with the package) and "The REXX Language; A
  13. Practical Approach to Programming" by M. F. Cowlishaw. 
  14.  
  15.  
  16. I. Specific features of the language:
  17.  
  18.   REXX is typeless -
  19.      
  20.     In REXX, all variables are considered to be character strings. 
  21.     Nothing has to be declared - variables are dynamically allocated
  22.     and deallocated as needed. Operations check to see that the 
  23.     operands have valid values. The language includes a rich set of
  24.     operators for string concatenation, arithmetic, string and
  25.     numeric comparison, and logical operations.
  26.  
  27.  
  28.   Full set of control statements -
  29.  
  30.     REXX has several flavors of DO ( do i = 1 to 10; do while; 
  31.     do until; ...), a SELECT statement (similar to C's SWITCH), compound
  32.     IF/ELSE, and a SIGNAL statement to trap errors. There is *no* GOTO
  33.     statement, but BREAK, ITERATE, and LEAVE provide limited forms
  34.     of GOTO.
  35.  
  36.  
  37.   Callable functions -
  38.  
  39.     There are several types of functions: 
  40.  
  41.         Built-in functions - functions which are defined as part of
  42.                             a specific implementation of the language.
  43.  
  44.         Internal routines  - REXX "subroutines" located within a program
  45.  
  46.         External routines  - external REXX "subroutines"
  47.  
  48.         External functions - the language may be effectively extended
  49.                              by writing function libraries, which are
  50.                              implemented as Amiga shared libraries.
  51.  
  52.  
  53.   Interprocess communication, hosts, and commands -
  54.  
  55.     REXX provides an EASY-TO-USE mechanism to communicate with other
  56.     programs. If an application program, e.g. a terminal emulator, 
  57.     initializes the proper interface, it can become a REXX "host". 
  58.     REXX hosts can accept "commands" and pass "results" back to any 
  59.     REXX program. Thus REXX programs can be used to control other
  60.     programs and/or to integrate a number of different applications.
  61.     This is a VERY powerful capability in a multitasking environment!
  62.  
  63.  
  64.   Interpreted execution, source level debugging and tracing - 
  65.  
  66.     These features greatly ease the task of program development.
  67.  
  68.  
  69.  
  70.   Some of the functions available as part of the AREXX environment -
  71.  
  72.     I/O functions:
  73.  
  74.       The REXX language has PULL and SAY commands to read from STDIN and
  75.       write to STDOUT. In addition, the function libraries include the
  76.       commands OPEN(), CLOSE(), EXISTS(), READCH(), WRITECH(), READLN(),
  77.       WRITELN(), EOF(), and SEEK() for working with data files.
  78.  
  79.     Interprocess communication:
  80.  
  81.       REXX programs can act as hosts via the support library functions
  82.       OPENPORT(), CLOSEPORT(), WAITPKT(), GETPKT(), and GETARG().
  83.  
  84.     Other "Builtin" functions -
  85.  
  86.       AREXX includes a wide variety of other builtin functions for string
  87.       parsing and manipulation, bit manipulation, memory allocation and
  88.  
  89.     Other function libraries -
  90.  
  91.       Willy Langeveld has written three: rexxarplib.library gives limited 
  92.       use of arp.library; rexxmathlib.library adds IEEE transcendental
  93.       function support; rexxmathsbii.library adds 68881 support for those
  94.       with a Starboard II 68881 chip.
  95.  
  96.  
  97.  
  98. II. The abilities of AREXX make it suitable for:
  99.  
  100.     General purpose programming and programming education - 
  101.   
  102.         modern and powerful language, but with a simple syntax 
  103.         and typeless data
  104.  
  105.     Tailoring User commands - 
  106.  
  107.         with a suitable shell (see WSHell writeup) AREXX can 
  108.         serve as a very powerful shell script language
  109.  
  110.     Macros ("execs")-
  111.  
  112.         For applications that support AREXX, it serves as a general
  113.         purpose macro language.
  114.  
  115.     Prototype development -
  116.  
  117.         The highly interactive, interpreted environment provided by
  118.         AREXX make it a very productive system for modelling applications
  119.         software during development.
  120.  
  121.  
  122.  
  123. III. Programs which currently support AREXX are: 
  124.  
  125.       VLT       - the VT100/Tektronix terminal emulator by Willy Langeveld.
  126.       TxEd+     - text editor by Charlie Heath (Microsmiths Software).
  127.       AmigaTeX  - Amiga implementation of TeX by Tom Rokicki 
  128.                   (Radical Eye Software).
  129.       Cape Macro Assembler
  130.                 - This is an integrated assembler development system.
  131.       MicroFiche Filer 
  132.                 - a graphics oriented database.
  133.  
  134.     There is also an AREXX version of micrognuemacs as well as SpeechToy.
  135.     (Source code is available for these if one wants examples of how to
  136.     add the proper AREXX interface)
  137.  
  138.  
  139.  
  140. IV. Examples:
  141.  
  142.       I have macros that integrate my editor (TxEd+), AmigaTeX, and VLT
  143.   into a very nice system. For example, from within my editor a can send
  144.   the current file to AmigaTeX, to be TeX'ed and previewed. In about
  145.   3 seconds I can be looking at the first page on the previewer. Or I can
  146.   mark some text (usually a complicated equation) and send it to tex. 
  147.   This feature is very nice for "debugging" equations in long documents.
  148.   If TeX encounters an error, I can select a menu item in the editor and
  149.   a macro talks to AmigaTeX, finds out where the error occured, and
  150.   positions my cursor at the appropriate place. When I'm satisfied with
  151.   the file, I can select another item and have a macro send the file
  152.   to the VAX (via VLT) and print it on the laser printer.
  153.  
  154.       I have another set of macros for referencing the C include files
  155.   while programming. If I want information about a data structure, I
  156.   position the cursor on the structure name and run the reference macro.
  157.   It checks a reference table to see if the selected text has an entry,
  158.   and if so, where to find the entry. If it finds one it extracts the 
  159.   entry from the appropriate file and loads it into a second editor 
  160.   window. 
  161.  
  162.  
  163. V. Conclusion
  164.  
  165.   I think AREXX has a lot to offer the Amiga. If you want to find out
  166.   more about REXX, there are a couple of books. The one by Cowlishaw
  167.   mentioned above and "Modern Programming Using REXX" by O'Hara and
  168.   Gomberg. I think there have also been some recent articles on REXX
  169.   in Byte and one of the PeeCee magazines. Bill Hawes also has an
  170.   artical in "The Amigan - Apprentice & Journeyman", V2N3 p.262. Don't
  171.   spend too much money doing research though - the AREXX package is
  172.   only $49.95 and includes an excellent manual (155 pages, TeX'ed, with
  173.   a good table of contents and index). For information, check your local
  174.   dealer or contact:
  175.  
  176.                     William S. Hawes
  177.                     P.O. Box 308
  178.                     Maynard, MA 01754
  179.                     (617) 568-8695
  180.  
  181.  
  182.  
  183.